package com.frost.demo1;

public class Student {
    private String name;
    private int age;
    private double score;
    public static String classes;

    public Student(String name, int age, double score) {
        this.name = name;
        this.age = age;
        this.score = score;
    }

    static {
        System.out.println("a");
    }

    static {
        System.out.println("b");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

//    public static String getClasses() {
//        return classes;
//    }
//
//    public static void setClasses(String classes) {
//        Student.classes = classes;
//    }

    public void doClass() {
        System.out.println(this.name + "正在上课" + classes);
    }

    public static void func() {
        System.out.println("这是一个静态成员方法");
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", score=" + score +
                ", classes=" + classes +
                '}';
    }
}
